dnl Process this file with autoconf to produce a configure script.

AC_INIT([gshot], [0.8.3], [http://code.google.com/p/gshot/issues/entry], [gshot], [http://code.google.com/p/gshot/])
AM_INIT_AUTOMAKE(1.11 dist-xz no-dist-gzip)
AM_SILENT_RULES([yes])

AC_CONFIG_HEADER(config.h)

AC_CONFIG_MACRO_DIR([m4])

AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC

AM_PROG_CC_C_O

AC_PATH_XTRA

PKG_CHECK_MODULES(PACKAGE, [gtk+-2.0 >= 2.16.0 gtk+-unix-print-2.0])
AC_SUBST(PACKAGE_CFLAGS)
AC_SUBST(PACKAGE_LIBS)

dnl Check for libunique
AC_ARG_ENABLE(unique,
	AC_HELP_STRING([--enable-unique], [enable libunique support (enabled)]),
        [have_unique=$enableval], [have_unique=yes])

if test x$have_unique = xyes; then
    PKG_CHECK_MODULES(UNIQUE, [unique-1.0],
        [AC_DEFINE(HAVE_UNIQUE, [1], [Define this if you have unique library])],
        [have_unique=no])
fi
AM_CONDITIONAL([UNIQUE], [test x$have_unique = xyes])
AC_SUBST(UNIQUE_CFLAGS)
AC_SUBST(UNIQUE_LIBS)

GTK_DISABLE_DEPRECATED

IT_PROG_INTLTOOL([0.40.0])

GETTEXT_PACKAGE=gshot
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
AM_GLIB_GNU_GETTEXT

AC_OUTPUT([
Makefile 
src/Makefile
po/Makefile.in
data/Makefile
data/scripts/Makefile
])

echo
echo "Optional features:"
echo "   libunique support       - $have_unique"
echo 
